package com.minimalist.common.entity.lindi.po;

import com.minimalist.common.config.mybatis.InsertFullColumnHandler;
import com.minimalist.common.config.mybatis.UpdateFullColumnHandler;
import com.minimalist.common.config.mybatis.bo.BaseEntity;
import com.mybatisflex.annotation.Table;
import java.io.Serial;
import java.io.Serializable;

/**
 * 林地指标交易平台_交易申请确认函模板文件 实体类。
 *
 * @author 11987
 * @since 2025-06-06
 */
@Table(value = "LINDI_TRADE_APPLICATION_TEMPLATE_CONFIRM_LETTER", onInsert = InsertFullColumnHandler.class, onUpdate = UpdateFullColumnHandler.class)
public class LindiTradeApplicationTemplateConfirmLetter extends BaseEntity implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 确认函模板ID
     */
    private Long templateConfirmLetterId;

    /**
     * 交易申请ID
     */
    private Long tradeApplicationId;

    /**
     * 确认函类型
     */
    private String confirmLetterType;

    /**
     * 文件ID
     */
    private Long fileId;

    // 无参构造函数
    public LindiTradeApplicationTemplateConfirmLetter() {
    }

    // 全参构造函数
    public LindiTradeApplicationTemplateConfirmLetter(Long templateConfirmLetterId, Long tradeApplicationId, String confirmLetterType, Long fileId) {
        this.templateConfirmLetterId = templateConfirmLetterId;
        this.tradeApplicationId = tradeApplicationId;
        this.confirmLetterType = confirmLetterType;
        this.fileId = fileId;
    }

    // Getter和Setter方法
    public Long getTemplateConfirmLetterId() {
        return templateConfirmLetterId;
    }

    public void setTemplateConfirmLetterId(Long templateConfirmLetterId) {
        this.templateConfirmLetterId = templateConfirmLetterId;
    }

    public Long getTradeApplicationId() {
        return tradeApplicationId;
    }

    public void setTradeApplicationId(Long tradeApplicationId) {
        this.tradeApplicationId = tradeApplicationId;
    }

    public String getConfirmLetterType() {
        return confirmLetterType;
    }

    public void setConfirmLetterType(String confirmLetterType) {
        this.confirmLetterType = confirmLetterType;
    }

    public Long getFileId() {
        return fileId;
    }

    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        LindiTradeApplicationTemplateConfirmLetter that = (LindiTradeApplicationTemplateConfirmLetter) o;
        return java.util.Objects.equals(templateConfirmLetterId, that.templateConfirmLetterId) &&
               java.util.Objects.equals(tradeApplicationId, that.tradeApplicationId) &&
               java.util.Objects.equals(confirmLetterType, that.confirmLetterType) &&
               java.util.Objects.equals(fileId, that.fileId);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(super.hashCode(), templateConfirmLetterId, tradeApplicationId, confirmLetterType, fileId);
    }

    @Override
    public String toString() {
        return "LindiTradeApplicationTemplateConfirmLetter{" +
               "templateConfirmLetterId=" + templateConfirmLetterId +
               ", tradeApplicationId=" + tradeApplicationId +
               ", confirmLetterType='" + confirmLetterType + '\'' +
               ", fileId=" + fileId +
               "} " + super.toString();
    }

    // Builder类
    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private Long templateConfirmLetterId;
        private Long tradeApplicationId;
        private String confirmLetterType;
        private Long fileId;

        public Builder templateConfirmLetterId(Long templateConfirmLetterId) {
            this.templateConfirmLetterId = templateConfirmLetterId;
            return this;
        }

        public Builder tradeApplicationId(Long tradeApplicationId) {
            this.tradeApplicationId = tradeApplicationId;
            return this;
        }

        public Builder confirmLetterType(String confirmLetterType) {
            this.confirmLetterType = confirmLetterType;
            return this;
        }

        public Builder fileId(Long fileId) {
            this.fileId = fileId;
            return this;
        }

        public LindiTradeApplicationTemplateConfirmLetter build() {
            return new LindiTradeApplicationTemplateConfirmLetter(templateConfirmLetterId, tradeApplicationId, confirmLetterType, fileId);
        }
    }

}
